posted 03-01-2002 01:33 PM
This thread is pretty interesting, since it's mainly about what I've spent 90% of my waking hours working on for the past two months.It's been an interesting challenge. Rewrote the basic lighting pipeline about 20 times, trying different algorithms, optimizations, etc. I'm pretty happy with how it's turned out. The pipeline is divided into logical segments: allocation, projection, determination (mapping), illumination, flooding, filtering, subsampling, diffuse calculation, compression, re-projection, and storage.
The modular nature now lets me experiment with one portion of the pipeline without disturbing the rest.
This weekend I was planning on holing up in my office and giving a go at writing a shadow-volume BSP generator. Each lightsource would have a unique SVBSP that would enable quick determination of light/dark for any arbitrary point in the world.
It should drop neatly into the illumination module without any significant rearchitecting of the rest of it.
Lightmaps are a good thing. Like Maj said, they're basically free at runtime. It will be a little while before realtime illumination for geometry as complex as Quake 3 approaches the quality of precomputed lighting.
For every leap forward in realism, something initially has to give. Take, for instance, Quake 1. It had nowhere near the character throughput that the original Doom engine allowed on the same hardware. It simply wasn't possible to render texturemapped triangle models as fast as 2d billboards.
But Moore's law marches on, and today we have Serious Sam with hundreds of baddies onscreen at any time, all rendered in fully-lit, texturemapped glory.
Unless the new Doom has some sort of static precomputed lighting in addition to the realtime lightsources, there is simply no way that the number of lightsources in a Doom map could approach what you have in a typical Quake 3 map.
I'm sure there will be some vocal whiny backlash "why can't I make maps like Quake???" because of it. But--I'm probably going to get caught with my pants down on this one--the bar will be back up again in a year or two.
For those of you who are interested, here is a half-decent paper on shadow volume BSPs.
y
P.S.
Q3Map can import/export lightmaps now, as well as filter them:
-light

-light -super 2 (-extra)

-light -super 2 -filter (-extrawide)

Edit: Forgot to mention, -filter is free and can be used with or without supersampling.